package com.example.administrator.babymusic.ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;

import com.example.administrator.babymusic.R;
import com.example.administrator.babymusic.presenter.IUserPresenter;
import com.example.administrator.babymusic.presenter.UserPresenter;
import com.example.administrator.babymusic.ui.myInterface.IMoreFgView;

/**
 * Created by Administrator on 2016/11/1 0001.
 */

public class MoreFragment extends BaseFragment implements IMoreFgView{
    private GridView myGrid;

    private IUserPresenter mUserPresenter;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(getLayout(), container,false);
        initView(view);
        showItem();
        return view;
    }

    @Override
    public int getLayout() {
        return R.layout.fragment_more;
    }

    @Override
    protected void initView(View view) {
        super.initView(view);
        myGrid = (GridView)view.findViewById(R.id.my_grid);

    }



    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       // mUserPresenter = new UserPresenter();


    }

    @Override
    public void showItem() {
        mUserPresenter.showFgMoreItem(getContext(), myGrid);
    }
}
